[Bug Fix] Accordion: sync docs Stimulus controller with gem - #490
Merged
Conversation
The docs app's copy of the accordion controller was never updated when the gem fixed hidden-content handling in 0897b2a, so https://rubyui.com/docs/accordion's own preview never opened — clicking a trigger did nothing since the content stayed `hidden` regardless of height animation. The gem component itself was already correct.
9 tasks
cirdes
approved these changes
Jul 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #489
Summary
hiddenattribute on the content element in sync with the height animation.docs/app/javascript/controllers/ruby_ui/accordion_controller.jsis a separate copy (docs bundles its own JS controllers) that was never updated after that fix, so the live preview at rubyui.com/docs/accordion never opened when clicked.diff.The
Accordioncomponent in the gem itself was already correct; no gem changes needed.Test plan
diff gem/lib/ruby_ui/accordion/accordion_controller.js docs/app/javascript/controllers/ruby_ui/accordion_controller.js→ identical.pnpm build) locally in the docs devcontainer, ran the Rails dev server, and manually verified in browser: trigger now opens (content reveals, chevron rotates) and closes (content hides, chevron resets) correctly.Summary by cubic
Sync the docs accordion Stimulus controller with the gem so accordion previews open and close correctly. Fixes #489.
hiddenattribute in sync with the height animation.hiddenbefore measuring height and re-applies it after the close animation to avoid layout/focus issues.Written for commit c989ae6. Summary will update on new commits.